<template>
  <div>
    <Suspense>
      <template #default>
        <div>
          <async-one />
          <async-two />
        </div>
      </template>
      <template #fallback>
        <h1>Loading...</h1>
      </template>
    </Suspense>
  </div>
</template>

<script>
import { onErrorCaptured } from "vue";
import AsyncOne from '../../components/Async1.vue'
import AsyncTwo from '../../components/Async2.vue'

export default {
  name: "suspense",
  components:{
    AsyncOne,
    AsyncTwo
  },
  setup() {
    onErrorCaptured((error) => {
      console.log(error);
      return true;
    })

    return {};
  }
}
</script>